<template>
  <div class="demo">
    <h3>这是一个Demo组件</h3>
    <p>使用pinia中的数据:{{store.$state.count}}==={{store.evenOrOdd}}</p>
    <p>使用pinia中的数据:{{store.count}}==={{store.evenOrOdd}}</p>
    <button @click="updateData">修改数据</button>
  </div>
</template>

<script setup>
import {useCounterStore} from '../stores/counter'
const store = useCounterStore()
console.log('demo',store)
const updateData=()=>{
  // store.changeCount(10,20,30)
  store.changeCount(1)
}
</script>

<style>
.demo {
  width: 600px;
  height: 300px;
  background-color: skyblue;
}
</style>